<?php if (count($currencies) > 1) { ?>
<div class="pull-left currency-box">
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="currency">
  <div class="currency-switcher">
    <div class="select_curr dropdown-toggle" data-toggle="dropdown">
    <?php foreach ($currencies as $currency) { ?>
    <?php if ($currency['symbol_left'] && $currency['code'] == $code) { ?>
    <span ><?php echo $currency['title']; ?></span> <i class="caret"></i>
    <?php } elseif ($currency['symbol_right'] && $currency['code'] == $code) { ?>
    <span ><?php echo $currency['title']; ?></span> <i class="caret"></i>
    <?php } ?>
    <?php } ?>
    </div>
    <div class="currency_detail dropdown-menu">
    <div class="currency-inner">
    
      <?php foreach ($currencies as $currency) { ?>
      <?php if ($currency['symbol_left']) { ?>
      <a class="currency-select " type="button" name="<?php echo $currency['code']; ?>"><span><?php echo $currency['symbol_left']; ?> <?php echo $currency['title']; ?></span></a>
      <?php } else { ?>
      <a class="currency-select " type="button" name="<?php echo $currency['code']; ?>"><span><?php echo $currency['symbol_right']; ?> <?php echo $currency['title']; ?></span></a>
      <?php } ?>
      <?php } ?>
    
    </div>
    </div>
  </div>
  <input type="hidden" name="code" value="" />
  <input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
</form>
</div>
<?php } ?>
